/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.Cities;
import com.aptech.session.CitiesFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author DucMinh
 */
@ManagedBean
@RequestScoped
public class SearchCitiesBean {
    @EJB
    private CitiesFacadeLocal citiesFacade;

    /** Creates a new instance of SearchCitiesBean */
    public SearchCitiesBean() {
    }
    private String filed;
    private Object value;
    private List<Cities> listcities;

    public String getFiled() {
        return filed;
    }

    public void setFiled(String filed) {
        this.filed = filed;
    }

    public List<Cities> getListcities() {
        return listcities;
    }

    public void setListcities(List<Cities> listcities) {
        this.listcities = listcities;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    public String searchroles()
    {
        listcities=citiesFacade.searchCities(filed, value);
        return "ResultCities";
    }
}
